projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beb3d85
)
Terminate allocated string.
author
robertl
<robertl>
Tue, 30 Sep 2003 04:51:37 +0000
(
04:51
+0000)
committer
robertl
<robertl>
Tue, 30 Sep 2003 04:51:37 +0000
(
04:51
+0000)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index 0bd965b8162128466beb8b32898722c939d7abab..5219a6606b922be616e643ea5c02d09d82c88623 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-171,6
+171,7
@@
xstrndupt(const char *str, size_t sz)
newstr = xmalloc(newlen + 1);
memcpy(newstr, str, newlen);
+ newstr[newlen+1] = '\0';
rtrim(newstr);
return newstr;